package com.zbkj.service.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.common.model.MemberRewards;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 会员奖励表 Mapper 接口
 * </p>
 *
 * @author keNan
 * @since 2025-04-10
 */
public interface MemberRewardsDao extends BaseMapper<MemberRewards> {


    /**
     * 根据会员id查询会员赠送信息
     *
     * @param idList
     * @return
     */
    @MapKey("paidMemberCardId")
    Map<Integer, MemberRewards> selectListByPaidMemberCardId(@Param("idList") List<Integer> idList);


    /**
     * 根据会员id查询会员奖励
     *
     * @param paidMemberCardId
     * @return
     */
    MemberRewards selectOneByPaidMemberCardId(@Param("paidMemberCardId") Integer paidMemberCardId);
}
